<template>
  <div>
    <button type="submit" @click="handleClick">点击</button>
    <button @click="clickme">你好</button>
  </div>
</template>

<script>
  export default {
    name: 'Hello',
    data() {
      return {
        msg: 'Hello World',
      };
    },
    methods: {
      handleClick() {
        this.onDelete();
      },
      clickme() {},
    },
    props: ['onDelete'],
    mounted() {
      this.$bus.$on('hello', (data) => {
        console.log('收到了数据', data);
      });
    },
    beforeDestroy() {
      this.$bus.$off('hello');
    },
  };
</script>

<style></style>
